home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / earkit / misc / amfinger / install_amfinger < prev    next >
Text File  |  1998-05-24  |  10KB  |  248 lines

  1. ;******************************************************************************
  2. ;      ____           ______ __                         
  3. ;     / __ \         / ____//_/                        
  4. ;    / /_/ /_   _   / /_   __   ______  ______ ______ _____
  5. ;   / __  // \_/ \ / __/  / /  / __  / / __  // ____// .__/
  6. ;  / / / // /__/ // /    / /_ / / / / / /_/ // __/_ / /
  7. ; /_/ /_//_/  /_//_/    /___//_/ /_/ _\__  //_____//_/
  8. ;                                   /_____/       
  9. ; $VER: 0.83 (February-15-1997) 
  10. ; amfinger ©1996-1997 by Philip Law
  11. ; amfinger Installer ©1996-1997 by Robert C. Reiswig 
  12. ;
  13. ; If you wish to use any part of this installer you must ask. May not be 
  14. ; integrated/placed into any other package. Changes, suggestions or problems:
  15. ; amfinger@vgr.com or rcr@netcom.com
  16. ;******************************************************************************
  17. ;*** System Stuff ***
  18. (set vernum1 (getversion "amfinger")) (set ver1 (/ vernum1 65536)) 
  19. (set rev1 (- vernum1 (* ver1 65536) ) ) (set amfingerver (cat ver1 "." rev1))
  20.  
  21. (set mfound 0) (set newicon1 1) 
  22. (set keeper 1) (set firsttime 0)
  23.  
  24. ;********************************************************************
  25. ; English Strings
  26. ;********************************************************************
  27. (set #about (cat "\n\n\nWelcome to\n\nAmFinger " amfingerver "\n\nCopyright © 1996-1997 by Philip Law\n") )
  28. (set #nomui (cat "\n\nAmFinger uses Magic User Interface (MUI).\n\nThe installer has not found MUI: to be assigned, "
  29.                  "therefore you AmFinger will not work correctly.  You will need to install "
  30.                  "MUI before running AmFinger."
  31.             )
  32. )
  33. (set #whereamfinger "Where do you wish to install AmFinger. A directory called 'AmFinger' will be created if one is not there. If a copy of AmFinger is found it will be backed up.")
  34. (set muiver "No Version Installed")
  35. (set #newermui "\n\nAmFinger needs version 3.0 or higher of MUI installed to work correctly.\n\nNow would be a good time to Upgrade!\n\n It looks like you have: \n\n")
  36. (set #need-os "\n\nThe 68020 version of AmFinger needs version 3.0 or higher of the Amiga OS installed to work correctly.\n\n It looks like you have: \n\n")
  37. (set #000used "\n\nThe 68000 version will be installed.") 
  38. (set #filethere1 "\n\nThe installer has found AmFinger version ")
  39. (set #filethere2 " at ")
  40. (set #filethere3 "\n\nThe file will be renamed to ")
  41. (set #filethere4 " and it will then be moved to ")
  42. (set #oktodelete1 "\nIs it ok to delete the older AmFinger binary so that the AmFinger Directory can be made?\n")
  43. (set #oktodelete2 "\nIs it ok to delete the older _renamed_ AmFinger binary so that the AmFinger Directory can be made?\n")
  44. (set #backuptoXXX "Back-UP to file named 'AmFinger")
  45. (set #copyover "Copy Over Old Version")
  46. (set #amfingerfound "\nThe Installer has found a copy of AmFinger already installed. What do you want to do?\n")
  47. (set #askcpu "\nCPU Check: What CPU does the machine have that you are installing AmFinger on? The installer has found:\n")
  48. (set #no020found "\n\nThe 68020 Version of AmFinger , AmFinger020, was not found in this archive the 68000 version was installed.")
  49. (set #newicon "\nDo you wish to copy over one of the AmFinger Icons from the archive? If you have any ToolTypes already set you should select no.\n")
  50. (set #pickicon "\nAmFinger has a number of different icons you can choose from. Which one would you like to use?\n")
  51. (set #nonewicon  "No  - ToolTypes already set.")
  52. (set #yesnewicon "Yes - Copy over Icon.")
  53. (set #whatcat "Select the AmFinger Language catalog you wish to install. (N/A = Not Available in this Archive.)")
  54. (set #wherecat "\nWhere do you wish to install the AmFinger Language Catalog? Default is ")
  55. (set #catnofind "Can not find this catalog in this AmFinger archive. You may need to get the complete archive from the support site.")
  56. (set #whatdocs "\nWhat AmFinger documentation would you like to install?\n")
  57. (set #wheredocs "Where would you like the AmFinger documentation you selected to be installed?")
  58. (set #byebye (cat "\nAmFinger Install Complete!\n\n" ))
  59. ;********************************************************************
  60. ; Hello
  61. ;********************************************************************
  62. (message #about)
  63. (welcome) 
  64.  
  65. ;********************************************************************
  66. ; MUI installed?
  67. ;********************************************************************
  68. (if (< (exists "mui:") 2)  (message #nomui) )
  69.  
  70. ;********************************************************************
  71. ; Check for amfinger requs
  72. ;********************************************************************
  73. (set ver 0)
  74. (if (exists "mui:mui") 
  75.  (
  76.   (set vernum (getversion "mui:mui") )
  77.   (set ver (/ vernum 65536)) (set rev (- vernum (* ver 65536) ) )
  78.  
  79.   (if (= ver 7) (set muiver "2.0") )   (if (= ver 8) (set muiver "2.1") )
  80.   (if (= ver 9) (set muiver "2.2") )   (if (= ver 10) (set muiver "2.3") )
  81.   (if (= ver 11) (set muiver "3.0") )  (if (= ver 12) (set muiver "3.1") )
  82.   (if (= ver 13) (set muiver "3.2") )  (if (= ver 14) (set muiver "3.3") )
  83.   (if (= ver 15) (set muiver "3.4") )  (if (= ver 16) (set muiver "3.5") )
  84.   (if (= ver 17) (set muiver "3.6") )  (if (= ver 18) (set muiver "3.7") )
  85.  )
  86. )
  87.  
  88. (if (< ver 11)   ( (message (cat #newermui muiver))   (set cpuPick 0) ))
  89. ;(if (< osver 39) ( (message (cat #need-os workbench #000used)) (set cpuPick 0) ))
  90.  
  91. ;********************************************************************
  92. ; Ask where to put amfinger & Make dir if needed
  93. ;********************************************************************
  94. (set Package (getassign "AmiTCP"))
  95.   (if (= Package "") (set Package (getassign "Inet"))
  96. )
  97.  
  98. (set amfingerdir  (askdir (prompt #whereamfinger)
  99.                        (help   #whereamfinger)
  100.                        (default Package)
  101.                )  
  102. )
  103.  
  104. (set where amfingerdir)
  105.  
  106. (if (= 1 (exists (tackon where "amfinger") ) ) 
  107.   (
  108.     (set vernum1 (getversion (tackon where "amfinger") ))
  109.     (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  110.     (set amfinger_old (cat ver1 "." rev1))
  111.  
  112.     (message (cat #filethere1 ver1 "." rev1 #filethere2 where #filethere3 
  113.                   (cat "amfinger" amfinger_old) #filethere4 (tackon amfingerdir "amfinger") )
  114.     )
  115.     
  116.  
  117.     (copyfiles (source (tackon where "amfinger"))
  118.                (dest where) 
  119.                (infos)
  120.                (newname (cat "amfinger" amfinger_old))
  121.     )
  122.  
  123.     (delete (tackon amfingerdir "amfinger") (prompt #oktodelete1) (help #oktodelete1) (confirm) (infos)) 
  124.  
  125.     (if (< (exists (tackon amfingerdir "amfinger")) 2) (makedir (tackon amfingerdir "AmFinger") (infos)) )    
  126.  
  127.     (copyfiles (source (tackon where (cat "amfinger" amfinger_old) ))
  128.                        (dest (tackon amfingerdir "amfinger")) 
  129.                        (infos)
  130.                
  131.     )
  132.  
  133.     (delete (tackon where (cat "amfinger" amfinger_old)) (prompt #oktodelete2) (help #oktodelete2) (confirm) (infos) ) 
  134.  
  135.     ;(set firsttime 1)
  136.  
  137.   )
  138. )
  139.  
  140. (if (< (exists (tackon amfingerdir "amfinger")) 2) (makedir (tackon amfingerdir "AmFinger") (infos)) )
  141. (set where (tackon amfingerdir "amfinger"))
  142. (set @default-dest where)
  143.  
  144. ;********************************************************************
  145. ; Check for old & backup
  146. ;********************************************************************
  147. (if (exists (tackon where "amfinger")) 
  148.   (
  149.       (set vernum1 (getversion (tackon where "amfinger") ))
  150.       (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  151.       (set amfinger_old (cat ver1 "." rev1))
  152.  
  153.       (set keeper  (askchoice (choices  (cat #backuptoXXX amfinger_old "'")  #copyover)
  154.                      (prompt #amfingerfound)
  155.                      (help   #amfingerfound)
  156.                      (default 0)
  157.                    )
  158.       )    
  159.  
  160.  
  161.       (if (= keeper 0)
  162.          (copyfiles (source (tackon where "amfinger"))
  163.                      (dest where) 
  164.                      (infos)
  165.                      (newname (cat "amfinger" amfinger_old))
  166.          )
  167.       )          
  168.  
  169.       (set firsttime 1)
  170.     
  171.   )
  172. )
  173.  
  174.  
  175. ;********************************************************************
  176. ; Copy over correct amfinger and Icon if wanted
  177. ;********************************************************************
  178. (copyfiles (source "amfinger") (dest where) (optional "nofail") )
  179.  
  180. (if (= firsttime 0)  (copyfiles (source "AmFinger.info") (dest where) (optional "nofail") ) )
  181.  
  182.  
  183. (if (= keeper 0) 
  184.   (
  185.    (set newicon (askchoice (choices #yesnewicon #nonewicon)
  186.                            (prompt #newicon)
  187.                            (help   #newicon)
  188.                            (default 0)
  189.                 )
  190.    )
  191.   
  192.    (if (= newicon 0) 
  193.      (copyfiles (source "AmFinger.info") (dest where)  (optional "nofail") )
  194.    )
  195.  
  196.   )
  197. )
  198. ;********************************************************************
  199. ; Copy over #?.mpc|#?.mcc (Need to be in mui:libs/mui)
  200. ;********************************************************************
  201. (if (<> (getassign "mui") "")
  202. (
  203.   (if (> (exists "mui:libs/mui") 0) 
  204.    (
  205.     (if (= (exists "mui") 2)
  206.      (
  207.         (working #updatingmuic)
  208.         (foreach "mui" "#?.mcc"
  209.            (copylib (source (tackon "mui" @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  210.         )
  211.      )
  212.  
  213.      (message #nomuiarc)
  214.  
  215.     )
  216.    )
  217.    (message (cat #newermui muiver #nompc)) 
  218.   )
  219. )
  220. )
  221.  
  222. ;********************************************************************
  223. ; Ask and and copy docs if wanted!
  224. ;********************************************************************
  225. (set docs (askoptions (choices " AmFinger.guide")
  226.                       (prompt #whatdocs)
  227.                       (help #whatdocs)
  228.                       (default 3)
  229.           )
  230. )
  231.  
  232. (if (<> docs 0)
  233.  (
  234.    (set docsdir (askdir (prompt #wheredocs)
  235.                        (help   #wheredocs)
  236.                        (default where)
  237.                 )  
  238.    )
  239.  
  240.    (if (IN docs 0) (copyfiles (source "amfinger.guide") (dest docsdir) (infos) (optional "nofail") ) )
  241.  )
  242. )
  243.  
  244. ;********************************************************************
  245. ; End Bye 
  246. ;********************************************************************
  247. (exit #byebye)
  248.